package com.crm.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "quotparts")
public class QuotParts implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;


	@Id
	@GeneratedValue(generator="increment")
	@GenericGenerator(name="increment", strategy = "increment")

	private Integer id;
	
	@Override
	public String toString() {
		return "QuotParts [id=" + id + ", quotid=" + quotid + ", quotPrice="
				+ quotPrice + ", fright=" + fright + ", assmbValue="
				+ assmbValue + ", total=" + total + ", utprice=" + utprice
				+ ", qty=" + qty + ", partid=" + partid + ", delivery="
				+ delivery + ", make=" + make + ", moq=" + moq + ", bcd=" + bcd
				+ ", margin=" + margin + ", supplier=" + supplier + ", source="
				+ source + ", otherparty=" + otherparty + ", other=" + other
				+ ", businessId=" + businessId + "]";
	}



	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="quotid")
	private int quotid;
	
	
	@Column(name="quot_price")
	private float quotPrice;

	private float fright;

	@Column(name="assmb_value")
	private float assmbValue;

	
	private float total;
	private float utprice;

	private Integer qty;

	@ManyToOne
	@JoinColumn(name="PARTID")
	private Parts partid;

	
	private String delivery;
	
	private String make;

	private Integer moq;

	private float bcd;

	private float margin;
	
	private Integer supplier;
	
	private Integer source;
	
	private String otherparty;
	
	private String other;
	
	@ManyToOne
	@JoinColumn(name="BUSINESS_ID")
	private Business businessId;
	

	public Business getBusinessId() {
		return businessId;
	}



	public void setBusinessId(Business businessId) {
		this.businessId = businessId;
	}



	public QuotParts() {
	}



	public QuotParts(int quotid, float quotPrice, float fright,
			float assmbValue, float utprice, Integer qty, Parts prtnum,
			String delivery, String make, Integer moq, float bcd, float margin,
			Integer supplier, Integer source,float total) {
		this.quotid = quotid;
		this.quotPrice = quotPrice;
		this.fright = fright;
		this.assmbValue = assmbValue;
		this.utprice = utprice;
		this.qty = qty;
		this.partid = prtnum;
		this.delivery = delivery;
		this.make = make;
		this.moq = moq;
		this.bcd = bcd;
		this.margin = margin;
		this.supplier = supplier;
		this.source = source;
	    this.total=total;
	}
	public QuotParts(Business businessId,int quot, float quotPrice, float fright,
			float assmbValue, float utprice, Integer qty, Parts prtnum,
			String delivery, String make, Integer moq, float bcd, float margin,
			Integer supplier, Integer source,float total) {
		this.quotid=quot;
		this.businessId=businessId;
		this.quotPrice = quotPrice;
		this.fright = fright;
		this.assmbValue = assmbValue;
		this.utprice = utprice;
		this.qty = qty;
		this.partid = prtnum;
		this.delivery = delivery;
		this.make = make;
		this.moq = moq;
		this.bcd = bcd;
		this.margin = margin;
		this.supplier = supplier;
		this.source = source;
		this.total=total;
	}



	public float getTotal() {
		return total;
	}



	public void setTotal(float total) {
		this.total = total;
	}



	public Parts getPartid() {
		return partid;
	}



	public void setPartid(Parts partid) {
		this.partid = partid;
	}



	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public float getQuotPrice() {
		return this.quotPrice;
	}

	public void setQuotPrice(float quotPrice) {
		this.quotPrice = quotPrice;
	}

	public float getFright() {
		return this.fright;
	}

	public void setFright(float fright) {
		this.fright = fright;
	}

	public float getAssmbValue() {
		return this.assmbValue;
	}

	public void setAssmbValue(float assmbValue) {
		this.assmbValue = assmbValue;
	}

	public float getUtprice() {
		return this.utprice;
	}

	public void setUtprice(float utprice) {
		this.utprice = utprice;
	}

	public Integer getQty() {
		return this.qty;
	}

	public void setQty(Integer qty) {
		this.qty = qty;
	}


	public String getDelivery() {
		return this.delivery;
	}

	public void setDelivery(String delivery) {
		this.delivery = delivery;
	}

	public int getQuotid() {
		return this.quotid;
	}

	public void setQuotid(int quotid) {
		this.quotid = quotid;
	}

	
	public String getMake() {
		return this.make;
	}

	public void setMake(String make) {
		this.make = make;
	}

	public Integer getMoq() {
		return this.moq;
	}

	public void setMoq(Integer moq) {
		this.moq = moq;
	}

	public float getBcd() {
		return this.bcd;
	}

	public void setBcd(float bcd) {
		this.bcd = bcd;
	}

	public float getMargin() {
		return this.margin;
	}

	public void setMargin(float margin) {
		this.margin = margin;
	}

	public Integer getSupplier() {
		return supplier;
	}

	public void setSupplier(Integer supplier) {
		this.supplier = supplier;
	}

	public Integer getSource() {
		return source;
	}

	public void setSource(Integer source) {
		this.source = source;
	}



	public String getOtherparty() {
		return otherparty;
	}



	public void setOtherparty(String otherparty) {
		this.otherparty = otherparty;
	}



	public String getOther() {
		return other;
	}



	public void setOther(String other) {
		this.other = other;
	}
	

}
